package com.hermes.intigration.db.dao.impl;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.hermes.intigration.db.dao.CorporationDAO;
import com.hermes.model.Corporation;

public class CorporationDAOImpl extends SqlMapClientDaoSupport implements
		CorporationDAO {

	@Override
	public void delete(int id) {
		this.getSqlMapClientTemplate().delete("deleteCorporation", id);
	}

	@Override
	public void insert(Corporation corporation) {
		this.getSqlMapClientTemplate().insert("insertCorporation", corporation);
	}

	@Override
	public Corporation selectByPk(int id) {
		return (Corporation) this.getSqlMapClientTemplate().queryForObject(
				"selectCorporationByPk", id);
	}

	@Override
	public void update(Corporation corporation) {
		this.getSqlMapClientTemplate().update("updateCorporation", corporation);
	}

}
